import { RouteRecordRaw } from 'vue-router';

export const baseRoutes: Array<RouteRecordRaw> = [
	{
		path: '/login',
		name: '登录',
		component: () => import('/@/views/login/index.vue'),
		meta: {
			isAuth: false,
		},
	},
	{
		path: '/',
		name: '/',
		component: () => import('/@/layout/index.vue'),
		redirect: '/home',
		children: [
			{
				path: '/home',
				name: 'home',
				component: () => import('/@/views/home/index.vue'),
			},
			{
				path: '/mytodo',
				name: 'mytodo',
				component: () => import('/@/views/mytodo/index.vue'),
			},
			{
				path: '/launch',
				name: 'launch',
				component: () => import('/@/views/launch/index.vue'),
			},
			{
				path: '/handle',
				name: 'handle',
				component: () => import('/@/views/handle/index.vue'),
			},
			{
				path: '/detail',
				name: 'detail',
				component: () => import('/@/views/detail/index.vue'),
			},
			{
				path: '/personal',
				name: 'personal',
				component: () => import('/@/views/personal/index.vue'),
			},
			{
				path: '/notice',
				name: 'noticeList',
				component: () => import('/@/views/notice/list.vue'),
			},
			{
				path: '/notice/detail',
				name: 'noticeDetail',
				component: () => import('/@/views/notice/detail.vue'),
			},
			{
				path: '/eventSearch',
				name: 'eventSearch',
				component: () => import('/@/views/eventSearch/list.vue'),
			},
		],
	},
];

export const notFoundAndNoPower = [
	{
		path: '/:path(.*)*',
		name: '找不到页面',
		component: () => import('/@/views/error/404.vue'),
		meta: {
			isAuth: false,
		},
	},
];
